package cn.zn.modules.appoin.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.zn.framework.common.utils.PageUtils;
import cn.zn.modules.appoin.entity.AppoinTimeRuleEntity;

/**
 * @author zn
 * @email zhunahao@qq.com
 * @date 2020-09-01 14:15:28
 */
public interface AppoinTimeRuleService extends IService<AppoinTimeRuleEntity> {

    PageUtils queryPage(AppoinTimeRuleEntity appoinTimeRule, IPage<AppoinTimeRuleEntity> page);

    /**
     * 保存规则
     *
     * @param entity
     * @return
     */
    boolean saveRule(AppoinTimeRuleEntity entity);

    /**
     * 修改启用状态
     *
     * @param id
     */
    void changeState(String id);

    /**
     * 查询当前正在使用的总规则
     *
     * @return
     */
    AppoinTimeRuleEntity queryUse();
}

